package cn.kgc.ubagnet.mapper;

import cn.kgc.ubagnet.pojo.Product;
import cn.kgc.ubagnet.pojo.ProductExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper {
    int countByExample(ProductExample example);

    int deleteByExample(ProductExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(Product record);

    List<Product> selectByExample(ProductExample example);

    Product selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByExample(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);
    //查询视图
    List<Product> seleByView_prodoct_protype(List<Integer> protypeid);

//    根据视图多添件查询数据
    List<Product> seleByView_prodoct_protypeconditions(@Param("list") List<Integer> list,@Param("colorid") Integer colorid
    ,@Param("sizeid")Integer sizeid,@Param("price1")Double price1,@Param("price2")Double price2,@Param("proname")String proname);


}